(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

f(x, f(a, y)) → f(a, f(f(f(a, x), h(a)), y))

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted CpxTRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(z0, f(a, z1)) → f(a, f(f(f(a, z0), h(a)), z1))
Tuples:

F(z0, f(a, z1)) → c(F(a, f(f(f(a, z0), h(a)), z1)), F(f(f(a, z0), h(a)), z1), F(f(a, z0), h(a)), F(a, z0))
S tuples:

F(z0, f(a, z1)) → c(F(a, f(f(f(a, z0), h(a)), z1)), F(f(f(a, z0), h(a)), z1), F(f(a, z0), h(a)), F(a, z0))
K tuples:none
Defined Rule Symbols:

f

Defined Pair Symbols:

F

Compound Symbols:

c

(3) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace F(z0, f(a, z1)) → c(F(a, f(f(f(a, z0), h(a)), z1)), F(f(f(a, z0), h(a)), z1), F(f(a, z0), h(a)), F(a, z0)) by

F(f(a, z1), f(a, x1)) → c(F(a, f(f(f(a, f(f(f(a, a), h(a)), z1)), h(a)), x1)), F(f(f(a, f(a, z1)), h(a)), x1), F(f(a, f(a, z1)), h(a)), F(a, f(a, z1)))
F(x0, f(a, x1)) → c(F(f(f(a, x0), h(a)), x1))

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(z0, f(a, z1)) → f(a, f(f(f(a, z0), h(a)), z1))
Tuples:

F(f(a, z1), f(a, x1)) → c(F(a, f(f(f(a, f(f(f(a, a), h(a)), z1)), h(a)), x1)), F(f(f(a, f(a, z1)), h(a)), x1), F(f(a, f(a, z1)), h(a)), F(a, f(a, z1)))
F(x0, f(a, x1)) → c(F(f(f(a, x0), h(a)), x1))
S tuples:

F(f(a, z1), f(a, x1)) → c(F(a, f(f(f(a, f(f(f(a, a), h(a)), z1)), h(a)), x1)), F(f(f(a, f(a, z1)), h(a)), x1), F(f(a, f(a, z1)), h(a)), F(a, f(a, z1)))
F(x0, f(a, x1)) → c(F(f(f(a, x0), h(a)), x1))
K tuples:none
Defined Rule Symbols:

f

Defined Pair Symbols:

F

Compound Symbols:

c, c

(5) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace F(f(a, z1), f(a, x1)) → c(F(a, f(f(f(a, f(f(f(a, a), h(a)), z1)), h(a)), x1)), F(f(f(a, f(a, z1)), h(a)), x1), F(f(a, f(a, z1)), h(a)), F(a, f(a, z1))) by

F(f(a, x0), f(a, x1)) → c(F(f(f(a, f(a, x0)), h(a)), x1), F(f(a, f(a, x0)), h(a)), F(a, f(a, x0)))

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(z0, f(a, z1)) → f(a, f(f(f(a, z0), h(a)), z1))
Tuples:

F(x0, f(a, x1)) → c(F(f(f(a, x0), h(a)), x1))
F(f(a, x0), f(a, x1)) → c(F(f(f(a, f(a, x0)), h(a)), x1), F(f(a, f(a, x0)), h(a)), F(a, f(a, x0)))
S tuples:

F(x0, f(a, x1)) → c(F(f(f(a, x0), h(a)), x1))
F(f(a, x0), f(a, x1)) → c(F(f(f(a, f(a, x0)), h(a)), x1), F(f(a, f(a, x0)), h(a)), F(a, f(a, x0)))
K tuples:none
Defined Rule Symbols:

f

Defined Pair Symbols:

F

Compound Symbols:

c, c

(7) CdtInstantiationProof (BOTH BOUNDS(ID, ID) transformation)

Use instantiation to replace F(x0, f(a, x1)) → c(F(f(f(a, x0), h(a)), x1)) by

F(f(y0, h(a)), f(a, z1)) → c(F(f(f(a, f(y0, h(a))), h(a)), z1))
F(a, f(a, x0)) → c(F(f(f(a, a), h(a)), x0))

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(z0, f(a, z1)) → f(a, f(f(f(a, z0), h(a)), z1))
Tuples:

F(f(a, x0), f(a, x1)) → c(F(f(f(a, f(a, x0)), h(a)), x1), F(f(a, f(a, x0)), h(a)), F(a, f(a, x0)))
F(f(y0, h(a)), f(a, z1)) → c(F(f(f(a, f(y0, h(a))), h(a)), z1))
F(a, f(a, x0)) → c(F(f(f(a, a), h(a)), x0))
S tuples:

F(f(a, x0), f(a, x1)) → c(F(f(f(a, f(a, x0)), h(a)), x1), F(f(a, f(a, x0)), h(a)), F(a, f(a, x0)))
F(f(y0, h(a)), f(a, z1)) → c(F(f(f(a, f(y0, h(a))), h(a)), z1))
F(a, f(a, x0)) → c(F(f(f(a, a), h(a)), x0))
K tuples:none
Defined Rule Symbols:

f

Defined Pair Symbols:

F

Compound Symbols:

c, c

(9) CdtInstantiationProof (BOTH BOUNDS(ID, ID) transformation)

Use instantiation to replace F(f(a, x0), f(a, x1)) → c(F(f(f(a, f(a, x0)), h(a)), x1), F(f(a, f(a, x0)), h(a)), F(a, f(a, x0))) by

F(f(a, h(a)), f(a, z1)) → c(F(f(f(a, f(a, h(a))), h(a)), z1), F(f(a, f(a, h(a))), h(a)), F(a, f(a, h(a))))

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(z0, f(a, z1)) → f(a, f(f(f(a, z0), h(a)), z1))
Tuples:

F(f(y0, h(a)), f(a, z1)) → c(F(f(f(a, f(y0, h(a))), h(a)), z1))
F(a, f(a, x0)) → c(F(f(f(a, a), h(a)), x0))
F(f(a, h(a)), f(a, z1)) → c(F(f(f(a, f(a, h(a))), h(a)), z1), F(f(a, f(a, h(a))), h(a)), F(a, f(a, h(a))))
S tuples:

F(f(y0, h(a)), f(a, z1)) → c(F(f(f(a, f(y0, h(a))), h(a)), z1))
F(a, f(a, x0)) → c(F(f(f(a, a), h(a)), x0))
F(f(a, h(a)), f(a, z1)) → c(F(f(f(a, f(a, h(a))), h(a)), z1), F(f(a, f(a, h(a))), h(a)), F(a, f(a, h(a))))
K tuples:none
Defined Rule Symbols:

f

Defined Pair Symbols:

F

Compound Symbols:

c, c

(11) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

F(f(y0, h(a)), f(a, z1)) → c(F(f(f(a, f(y0, h(a))), h(a)), z1))
F(a, f(a, x0)) → c(F(f(f(a, a), h(a)), x0))
We considered the (Usable) Rules:

f(z0, f(a, z1)) → f(a, f(f(f(a, z0), h(a)), z1))
And the Tuples:

F(f(y0, h(a)), f(a, z1)) → c(F(f(f(a, f(y0, h(a))), h(a)), z1))
F(a, f(a, x0)) → c(F(f(f(a, a), h(a)), x0))
F(f(a, h(a)), f(a, z1)) → c(F(f(f(a, f(a, h(a))), h(a)), z1), F(f(a, f(a, h(a))), h(a)), F(a, f(a, h(a))))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(F(x1, x2)) = [4]x2   
POL(a) = 0   
POL(c(x1)) = x1   
POL(c(x1, x2, x3)) = x1 + x2 + x3   
POL(f(x1, x2)) = [4] + [4]x2   
POL(h(x1)) = 0   

(12) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(z0, f(a, z1)) → f(a, f(f(f(a, z0), h(a)), z1))
Tuples:

F(f(y0, h(a)), f(a, z1)) → c(F(f(f(a, f(y0, h(a))), h(a)), z1))
F(a, f(a, x0)) → c(F(f(f(a, a), h(a)), x0))
F(f(a, h(a)), f(a, z1)) → c(F(f(f(a, f(a, h(a))), h(a)), z1), F(f(a, f(a, h(a))), h(a)), F(a, f(a, h(a))))
S tuples:

F(f(a, h(a)), f(a, z1)) → c(F(f(f(a, f(a, h(a))), h(a)), z1), F(f(a, f(a, h(a))), h(a)), F(a, f(a, h(a))))
K tuples:

F(f(y0, h(a)), f(a, z1)) → c(F(f(f(a, f(y0, h(a))), h(a)), z1))
F(a, f(a, x0)) → c(F(f(f(a, a), h(a)), x0))
Defined Rule Symbols:

f

Defined Pair Symbols:

F

Compound Symbols:

c, c

(13) CdtInstantiationProof (BOTH BOUNDS(ID, ID) transformation)

Use instantiation to replace F(a, f(a, x0)) → c(F(f(f(a, a), h(a)), x0)) by

F(a, f(a, h(a))) → c(F(f(f(a, a), h(a)), h(a)))

(14) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(z0, f(a, z1)) → f(a, f(f(f(a, z0), h(a)), z1))
Tuples:

F(f(y0, h(a)), f(a, z1)) → c(F(f(f(a, f(y0, h(a))), h(a)), z1))
F(f(a, h(a)), f(a, z1)) → c(F(f(f(a, f(a, h(a))), h(a)), z1), F(f(a, f(a, h(a))), h(a)), F(a, f(a, h(a))))
F(a, f(a, h(a))) → c(F(f(f(a, a), h(a)), h(a)))
S tuples:

F(f(a, h(a)), f(a, z1)) → c(F(f(f(a, f(a, h(a))), h(a)), z1), F(f(a, f(a, h(a))), h(a)), F(a, f(a, h(a))))
K tuples:

F(f(y0, h(a)), f(a, z1)) → c(F(f(f(a, f(y0, h(a))), h(a)), z1))
F(a, f(a, h(a))) → c(F(f(f(a, a), h(a)), h(a)))
Defined Rule Symbols:

f

Defined Pair Symbols:

F

Compound Symbols:

c, c

(15) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 trailing nodes:

F(a, f(a, h(a))) → c(F(f(f(a, a), h(a)), h(a)))

(16) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(z0, f(a, z1)) → f(a, f(f(f(a, z0), h(a)), z1))
Tuples:

F(f(y0, h(a)), f(a, z1)) → c(F(f(f(a, f(y0, h(a))), h(a)), z1))
F(f(a, h(a)), f(a, z1)) → c(F(f(f(a, f(a, h(a))), h(a)), z1), F(f(a, f(a, h(a))), h(a)), F(a, f(a, h(a))))
S tuples:

F(f(a, h(a)), f(a, z1)) → c(F(f(f(a, f(a, h(a))), h(a)), z1), F(f(a, f(a, h(a))), h(a)), F(a, f(a, h(a))))
K tuples:

F(f(y0, h(a)), f(a, z1)) → c(F(f(f(a, f(y0, h(a))), h(a)), z1))
Defined Rule Symbols:

f

Defined Pair Symbols:

F

Compound Symbols:

c, c

(17) CpxTrsMatchBoundsTAProof (EQUIVALENT transformation)

A linear upper bound on the runtime complexity of the TRS R could be shown with a Match-Bound[TAB_LEFTLINEAR,TAB_NONLEFTLINEAR] (for contructor-based start-terms) of 0.

The compatible tree automaton used to show the Match-Boundedness (for constructor-based start-terms) is represented by:
final states : [1]
transitions:
a0() → 0
h0(0) → 0
f0(0, 0) → 1

(18) BOUNDS(O(1), O(n^1))